package com.demo.phonerepair.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.demo.phonerepair.module.LoginUser;
import com.demo.phonerepair.module.RegisterUser;
import com.demo.phonerepair.pojo.User;
import com.demo.phonerepair.util.Result;

import java.util.Map;

public interface UserService extends IService<User> {
    LoginUser login(String usernameOrEmail, String password);

    Result<String> register(RegisterUser registerUser);

    Result<Map<String, Object>> getAllUser(int userId, String searchKeyword,
                                           Integer pageNum, Integer pagesize, String sortField, String sortorder);

    Result<String> updateUser(User user);

    int deleteUserByUserId(Integer userId);
}